<template>
    <div class="Box">
        <div class="Top">
            <div class="Top_top">
                <span class="Top_top_font">长沙市</span>
                <img class="Top_top_img1" :src="Img1" alt="">
                <img class="Top_top_img2" :src="Img2" alt="">
                <input class="Top_top_inp" type="text" placeholder="湖南体育产业研究院">
                <img class="Top_top_img3" :src="Img3" alt="">
                <img class="Top_top_img4" :src="Img4" alt="">
            </div>
            <div class="Top_img">
                <img class="Top_top_img5" :src="Img5" alt="">
            </div>
        </div>

        <div>
            <img class="Top_top_img6" @click="()=>{
                $router.push('/funroute')
            }" :src="Img6" alt="">
        </div>
        <div class="Boxnull"></div>

        <div class="Content">
            <div class="Content_top">
                <div class="Content_top_top">
                    <span class="Content_top_top_font1">排名</span>
                    <div class="Content_top_top_box1">
                        <span class="Content_top_top_font2">猜你喜欢</span>
                    </div>
                    <div class="Content_top_top_box2">
                        <span style="color: deepskyblue; font-weight: bold;">个人排名</span>
                        <span>单位排名</span>
                    </div>
                    <div class="Content_top_top_box3">
                        <span style="color: deepskyblue;">日排行</span>
                        <span>月排行</span>
                        <span>季度排行</span>
                    </div>
                </div>

                <div class="Content_top_bottom">
                    <div class="Content_top_bottom_box1">
                        <span>排名</span>
                        <span>姓名</span>
                        <span>步数</span>
                        <span>积分</span>
                    </div>
                    <div class="Content_top_bottom_box2"></div>
                    <div class="Content_top_bottom_box3">
                        数据
                    </div>
                    <div class="Content_top_bottom_box4">
                        查看更多
                    </div>
                </div>
            </div>
        </div>

        <div class="Bottom_img">
            <img :src="Img7" alt="">
        </div>

        <div class="Bottom">
            <div class="Bottom_title">
                <van-tabs v-model:active="active" :click-tab="TitleChange()">
                    <van-tab title="推荐">
                        <div class="Bottom_title_box">
                            <div class="Bottom_title_box_box">
                                <span class="Bottom_title_box_font1">专题</span>
                            </div>
                            <span class="Bottom_title_box_font2">看！中国体育天团夺冠东京奥运</span>
                            <div class="Bottom_title_box_box1">
                                <span class="Bottom_title_box_font3">运动猿</span>
                                <span class="Bottom_title_box_font4">1806跟贴</span>
                            </div>
                            <img class="Bottom_title_box_img" :src="Img8" alt="">
                        </div>
                        <div class="Bottom_title_box">
                            <div class="Bottom_title_box_box">
                                <span class="Bottom_title_box_font1">专题</span>
                            </div>
                            <span class="Bottom_title_box_font2">看！中国体育天团夺冠东京奥运</span>
                            <div class="Bottom_title_box_box1">
                                <span class="Bottom_title_box_font3">运动猿</span>
                                <span class="Bottom_title_box_font4">1806跟贴</span>
                            </div>
                            <img class="Bottom_title_box_img" :src="Img8" alt="">
                        </div>
                        <div class="Bottom_title_box">
                            <div class="Bottom_title_box_box">
                                <span class="Bottom_title_box_font1">专题</span>
                            </div>
                            <span class="Bottom_title_box_font2">看！中国体育天团夺冠东京奥运</span>
                            <div class="Bottom_title_box_box1">
                                <span class="Bottom_title_box_font3">运动猿</span>
                                <span class="Bottom_title_box_font4">1806跟贴</span>
                            </div>
                            <img class="Bottom_title_box_img" :src="Img8" alt="">
                        </div>
                    </van-tab>
                    <van-tab title="赛事活动">内容 2</van-tab>
                    <van-tab title="科学健身">内容 3</van-tab>
                    <van-tab title="政策通知">内容 4</van-tab>
                    <van-tab title="其他">内容 5</van-tab>
                </van-tabs>
                <div class="bottom_null"></div>
            </div>

        </div>
    </div>
</template>

<script lang="ts" setup name="HomePage">
import { ref,onMounted } from 'vue';
import 'vant/lib/index.css';
import Img1 from "@/component/yyp-component/Imgs/1.png"
import Img2 from "@/component/yyp-component/Imgs/2.png"
import Img3 from "@/component/yyp-component/Imgs/3.png"
import Img4 from "@/component/yyp-component/Imgs/4.png"
import Img5 from "@/component/yyp-component/Imgs/5.png"
import Img6 from "@/component/yyp-component/Imgs/6.png"
import Img7 from "@/component/yyp-component/Imgs/7.png"
import Img8 from "@/component/yyp-component/Imgs/8.png"

import axios, { fetchData } from "../../stores/request";
import router from '@/router';

const active = ref(0);

onMounted(async() => {
    const data = await fetchData("/profile")
    console.log(data);
    if(data == undefined){
        router.push("/login")
    }
})

function TitleChange() {
    
}

</script>

<style scoped>
* {
    margin: 0;
    padding: 0;
}

.Top {
    /* left: 0px;
    top: -35px; */
    width: 375px;
    height: 455px;
    /* line-height: 20px; */
    background-color: rgba(115, 203, 217, 1);
    /* color: rgba(16, 16, 16, 1); */
    font-size: 14px;
    text-align: center;
    /* font-family: Roboto; */
    overflow: hidden;
    position: absolute;
}

.Top_top {
    width: 100%;
    height: 55px;
    margin-top: 15px;
    position: absolute;
}

.Top_top_font {
    /* left: 10px;
    top: 22px; */
    width: 43px;
    height: 23px;
    margin-left: 10px;
    /* line-height: 20px; */
    color: rgba(251, 247, 243, 1);
    font-size: 16px;
    position: relative;
    /* text-align: center; */
    /* font-family: Roboto; */
    /* border: 0px solid rgba(255, 0, 0, 0); */
}

.Top_top_img1 {
    position: relative;
    top: 9px;
    left: 2px;
    width: 24px;
    height: 24px;
    /* background-color: rgba(255, 255, 255, 1); */
    /* text-align: center; */
    /* line-height: 20px; */
}

.Top_top_img2 {
    position: relative;
    left: 20px;
    top: 1px;
    width: 11px;
    height: 11px;
    z-index: 2;
    /* background-color: rgba(0, 0, 0, 1); */
}

.Top_top_inp {
    position: relative;
    left: -5px;
    top: 0px;
    width: 205px;
    height: 30px;
    /* line-height: 20px; */
    border-radius: 20px;
    /* background-color: rgba(255, 255, 255, 1); */
    /* color: rgba(16, 16, 16, 1); */
    /* font-size: 14px; */
    text-align: center;
    /* font-family: Roboto; */
    border: none;
}

.Top_top_img3 {
    position: relative;
    left: -5px;
    top: 9px;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    /* background-color: rgba(255, 255, 255, 1); */
}

.Top_top_img4 {
    position: relative;
    left: -5px;
    top: 9px;
    margin-left: 10px;
    width: 24px;
    height: 24px;
    /* background-color: rgba(255, 255, 255, 1); */
}

.Top_top_img5 {
    position: relative;
    left: -2px;
    top: 63px;
    width: 375px;
    height: 311px;
    /* line-height: 20px; */
    /* border-radius: 19px; */
    /* background-color: rgba(255, 255, 255, 1); */
    /* color: rgba(16, 16, 16, 1); */
    /* font-size: 14px; */
    /* text-align: center; */
    /* font-family: Roboto; */
}

.Top_top_img6 {
    position: relative;
    left: 0px;
    top: 387px;
    width: 375px;
    height: 112px;
}

.Boxnull {
    width: 100%;
    height: 381px;
}

.Content {
    position: relative;
    left: 0px;
    top: 0px;
    width: 375px;
    /* height: 2005px; */
    line-height: 20px;
    border-radius: 36px 36px 9px 9px;
    background-color: rgba(115, 166, 217, 1);
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    font-family: Roboto;
    display: flex;
    justify-content: center;
    /* 水平居中 */
}

.Content_top {
    left: 6px;
    top: 514px;
    width: 362px;
    height: 510px;
}

.Content_top_top {
    position: absolute;
    left: 6px;
    top: 13px;
    width: 362px;
    height: 106px;
    line-height: 20px;
    border-radius: 12px;
    background-color: rgba(240, 251, 255, 1);
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    font-family: Roboto;
}

.Content_top_top_font1 {
    position: relative;
    left: 31px;
    top: 12px;
    width: 32px;
    height: 22px;
    line-height: 22px;
    color: rgb(14, 182, 255);
    font-size: 16px;
    text-align: left;
    font-family: PingFangSC-regular;
}

.Content_top_top_box1 {
    position: relative;
    left: 13px;
    top: 20px;
    width: 63px;
    height: 17px;
    line-height: 20px;
    border-radius: 18px;
    background-color: rgba(14, 182, 255, 1);
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    text-align: center;
    font-family: Roboto;
}

.Content_top_top_font2 {
    position: relative;
    left: 0px;
    top: -2px;
    width: 48px;
    height: 17px;
    line-height: 17px;
    color: rgba(255, 255, 255, 1);
    font-size: 12px;
    text-align: center;
    font-family: PingFangSC-regular;
}

.Content_top_top_box2 {
    position: relative;
    left: 114px;
    top: -10px;
    width: 215px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.Content_top_top_box3 {
    position: relative;
    left: 31px;
    top: 0px;
    width: 310px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.Content_top_bottom {
    position: absolute;
    left: 6px;
    top: 122px;
    width: 362px;
    height: 391px;
    line-height: 20px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 1);
    color: rgba(16, 16, 16, 1);
    font-size: 14px;
    text-align: center;
    font-family: Roboto;
}

.Content_top_bottom_box1 {
    position: relative;
    left: 10px;
    top: 10px;
    width: 327px;
    height: 17px;
    line-height: 17px;
    color: rgb(16, 16, 16);
    font-size: 12px;
    text-align: left;
    font-family: PingFangSC-regular;
    display: flex;
    justify-content: space-between;
}

.Content_top_bottom_box2 {
    position: relative;
    left: 10px;
    top: 14px;
    width: 326px;
    height: 1px;
    /* background-color: rgba(187, 187, 187, 1); */
    border: 1px solid rgba(187, 187, 187, 1);
}

.Content_top_bottom_box3 {
    position: relative;
    left: 0px;
    top: 11px;
    width: 310px;
    height: 320px;
    border-radius: 4px;
}

.Content_top_bottom_box4 {
    position: relative;
    left: 156px;
    top: 0px;
    width: 65px;
    height: 17px;
    line-height: 17px;
    color: rgba(132, 132, 132, 1);
    font-size: 12px;
    text-align: left;
    font-family: PingFangSC-regular;
}

.Bottom_img img {
    position: absolute;
    left: 5px;
    top: 1024px;
    width: 363px;
    height: 156px;
    z-index: 2;
}

.Bottom {
    position: absolute;
    top: 1090px;
    width: 100%;
}

.Bottom_title {
    position: absolute;
    top: 100px;
    width: 100%;
    background-color: #EAF1F6;
}

.bottom_null {
    position: relative;
    top: 35px;
    width: 100px;
    height: 40px;
}

.Bottom_title_box {
    position: relative;
    width: 350px;
    height: 120px;
    background-color: #FFFFFF;
    border-radius: 5px;
    margin: 7px 12px 5px 13px;
}

.Bottom_title_box_box {
    position: absolute;
    top: 20px;
    left: 10px;
    background-color: #187DE8;
    width: 35px;
    height: 20px;
    text-align: center;
    line-height: 15px;
    border-radius: 5px;
}

.Bottom_title_box_font1 {
    position: relative;
    top: -4px;
    font-size: 13px;
    color: #EAF1F6;
}

.Bottom_title_box_font2 {
    position: absolute;
    top: 17px;
    left: 55px;
    width: 180px;
    font-size: 17px;
}

.Bottom_title_box_box1{
    position: absolute;
    top: 90px;
    left: 20px;
    width: 130px;
    display: flex;
    justify-content: space-between;
}

.Bottom_title_box_font3 {
    width: 180px;
    font-size: 12px;
    color: #B8B8B8;
}

.Bottom_title_box_font4 {
    width: 180px;
    font-size: 12px;
    color: #B8B8B8;
}

.Bottom_title_box_img {
    position: absolute;
    top: 20px;
    left: 240px;
    width: 100px;
    height: 70px;
}
</style>